import request from '@/utils/request'

// 运输任务表格
export const getTransportTask = (data) => {
  return request({
    method: 'post',
    url: '/transport-task-manager/page',
    data
  })
}
// 运输任务count
export const getTransportTaskCount = () => {
  return request({
    method: 'get',
    url: '/transport-task-manager/count'
  })
}
// 运输详情
export const getTaskDetail = (id) => {
  return request({
    method: 'get',
    url: '/transport-task-manager/' + id,
    params: {
      0: id
    }
  })
}
// 线路表格
export const getTransportLine = (data) => {
  return request({
    method: 'post',
    url: '/transportLine/page',
    data
  })
}
// 线路表格展开
export const expandTransportLine = (transportLineId) => {
  return request({
    method: 'get',
    url: '/transportLine/trips',
    params: {
      transportLineId
    }
  })
}
// 新增线路
export const addTransportLine = (data) => {
  return request({
    method: 'post',
    url: '/transportLine',
    data
  })
}
// 获取线路信息
export const getTransportLineDetail = (id) => {
  return request({
    method: 'get',
    url: '/transportLine/' + id,
    params: {
      0: id
    }
  })
}
// 新增线路
export const editTransportLine = (data) => {
  return request({
    method: 'put',
    url: '/transportLine/' + data.id,
    data
  })
}
// 删除线路
export const delTransportLine = (id) => {
  return request({
    method: 'delete',
    url: '/transportLine/' + id
  })
}
// 线路成本
export const getCost = () => {
  return request({
    method: 'get',
    url: '/cost-configuration-manager'
  })
}
// 修改成本
export const editCostInfo = () => {
  return request({
    method: 'post',
    url: '/cost-configuration-manager'
  })
}

/*
  取件作业管理
*/
// 取件作业表格
export const getPickUpTask = (data) => {
  return request({
    method: 'post',
    url: '/pickup-dispatch-task-manager/page',
    data
  })
}

